package com.party.business.domain;

import cn.hutool.core.collection.CollectionUtil;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.party.common.core.domain.TreeSelect;
import com.party.common.core.domain.entity.SysDept;
import com.party.common.core.domain.entity.SysMenu;
import lombok.Data;

import java.io.Serializable;
import java.util.List;
import java.util.stream.Collectors;

/**
 * Treeselect树结构实体类
 *
 * @author ruoyi
 */

public class TreeSelectQutype implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 节点ID */
    private String id;

    /** 节点名称 */
    private String label;

    /** 子节点 */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<TreeSelectQutype> children;

    public TreeSelectQutype(){

    }

//    public TreeSelectQutype(TQuestionType type)
//    {
//        this.id = type.getId()+"";
//        this.label = type.getName();          if(!CollectionUtil.isEmpty(type.getChildren())){
//            this.children = type.getChildren().stream().map(TreeSelectQutype::new).collect(Collectors.toList());
//        }
//
//    }
//





    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public List<TreeSelectQutype> getChildren() {
        return children;
    }

    public void setChildren(List<TreeSelectQutype> children) {
        this.children = children;
    }
}
